package com.googlecode.imanager.jasper.util;

import java.util.LinkedList;

import com.googlecode.imanager.client.Control;
import com.googlecode.imanager.client.Manager;
import com.googlecode.imanager.jasper.RApplication;
import com.googlecode.imanager.jasper.RContainer;
import com.googlecode.imanager.jasper.RControl;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public class RBandSet {
    
    private int headerDim;
    private int footerDim;
    
    private final boolean vertical;
    private final RApplication bridge;
    //private final Document document;
    
    private final LinkedList<RBandItem> header;
    private final LinkedList<RBandItem> footer;
    
    public RBandSet(RApplication bridge, boolean vertical) {
        //this.document = document;
        this.bridge = bridge;
        this.vertical = vertical;
        this.header = new LinkedList<RBandItem>();
        this.footer = new LinkedList<RBandItem>();
    }
    
    public void addBand(RContainer container){
        Control c = container.getSource().getHeader();
        if (c != null){
            addBand(container, (RControl) Manager.getImpl(c), true);
        }
        
        c = container.getSource().getFooter();
        if (c != null){
            addBand(container, (RControl) Manager.getImpl(c), false);
        }
    }

    private void addBand(RContainer container, RControl c, boolean isHeader) {
        
    }
    
}